package cn.edu.scau.cmi.xiaowenyang.multitonPattern;
import java.util.ArrayList;

public class PokemonTeam {
	private static int maxNumOfPokemon = 3;
	private static ArrayList<String> pokemonTeam = new ArrayList<>(maxNumOfPokemon);

	private PokemonTeam() {
	}

	public static boolean add(String name) {
		if (pokemonTeam.size() < maxNumOfPokemon) {
			pokemonTeam.add(name);
			return true;
		} else {
			return false;
		}
	}

	public static ArrayList<String> getPokemonTeam() {
		return pokemonTeam;
	}
}
